package com.model.dto.sys.userController;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UpdatePhoneDTO {
    @ApiModelProperty(value = "临时密钥",required = true)
    String passwordKey;

    /** 手机号 */
    @ApiModelProperty(value = "手机号长度为11位，手机号只能是数字",required = true)
    @Size( max = 11, message = "手机号长度为11位")
    @Pattern(regexp = "^[0-9]*$", message = "手机号只能是数字")
    String newMobile;

    /** 手机号验证码 */
    @ApiModelProperty(value = "手机号验证码，验证码长度限制为4位")
    @NotNull(message = "验证码不能为空")
    @Size(min = 4, max = 4, message = "验证码长度限制为4位")
    String mobileCode;
}
